package day02_homework;

public class Test02 {
    public static void main(String[] args) {
        String path = "http://localhost:8088/myweb/reg?name=zhangsan";
        String[] arr = path.split("\\?");
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        path = "http://localhost:8088/myweb/reg?name=zhangsan&pwd=123456&nick=san&age=16";
        arr = path.split("\\?");
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        String[] arr2 = arr[1].split("&");
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }

    }
}
